<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .outer {
            width: 1000px;
            height: 100px;
            border: 1px solid black;
        }

        .box {
            width: 100px;
            height: 100px;
            background-color: orange;
            animation-name: move2;
            animation-duration: 2s;
            animation-delay: .5s;
            /* animation-timing-function: steps(20); */
            animation-timing-function: linear;
            animation-iteration-count: infinite;
            /* animation-direction: reverse; */
            animation-direction: alternate;
            /* animation-direction: alternate-reverse; */
            /* animation-fill-mode: forwards; */
            /* animation-fill-mode: backwards; */
        }

        .outer:hover .box {
            animation-play-state: paused;
        }

        @keyframes move2 {
            from {
                background-color: black;
            }

            to {
                transform: translate(900px) rotate(360deg);
                background-color: rgb(80, 8, 15);
                border-radius: 50%;
            }
        }
    </style>
</head>

<body>
    <div class="outer">
        <div class="box"></div>
    </div>
</body>

</html>